/**
 * Created by Afee Lee on 2017-03-26.
 */

function getUser() {
    var clientId = $('#clientId').val();
    var clientSecret = $('#clientSecret').val();
    var userPanel = $('#users');

    $.ajax({
        url: "../wechat/user/list.html",
        type: "post",
        cache: false,
        data: {'clientId': clientId, 'clientSecret': clientSecret},

        beforeSend: function () {
            userPanel.html('');
        },
        success: function (data) {
            userPanel.html(data);
        },
        error: function (request, textStatus, errorThrown) {
            userPanel.html(request);
        }
    });
}